<script>

    let a = 1000;
    function fn() {
        a = a++ && --a;
        console.log(a) //1000   (1)
        function fn1(a) {
            console.log(++a)   //1   (3)
        }
        fn1(0)
    }
    console.log(a); //1000  (2)
    fn()
    console.log(a); //1000   (4)


    /*。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。*/

    console.log(1);  //1
    const fn = () => {
        console.log(2);  //3
        setTimeout(() => {
            console.log(3)  //5
        }, 0)
        console.log(4)   //4
    }
    console.log(5)  //2
    fn()

  /*。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。*/
     

</script>
<div class="box1">box</div>
<script>
    console.log(1);   //1
    document.querySelector('.box').addEventListener('click',()=>{
        console.log(2)   //3
        setTimeout(()=>{
           console.log(3)  //5
        },0)
        console.log(4)  //4
    })
     console.log(5)   //2
     document.querySelector('.box').click();
</script>